/*******************************************************************************
 *
 * Copyright (c) 2008-2011 ayound@gmail.com, guwei8576431@gmail.com
 * This program and the accompanying materials
 * are made available under the terms of the GNU GENERAL PUBLIC LICENSE
 * which accompanies this distribution, and is available at
 * http://dev.perl.org/licenses/gpl1.html
 * All rights reserved.
 *
 * Created on 2009-10-18
 *******************************************************************************/


package org.cgtw.scriptprofile.engine;


public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
			int pid = SystemInformation.runProcess("C:\\Program Files\\Internet Explorer\\iexplore.exe", " http://www.google.cn");
			for(int i=0;i<100;i++){
				int cpu = SystemInformation.getCpuProcessUsage(pid);
				int mem = SystemInformation.getMemProcessUsage(pid);
				System.out.println("cpu: " + cpu + "%        mem: " + mem + "K");
				try {
					Thread.sleep(500);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
	}

}
